<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>{{ name }}'s Watchlist</title>
    <link rel="stylesheet" href="{{url_for('static',filename='style.css')}}" type ="text/css">
    <link rel="icon" href="{{ url_for('static', filename='images/image2.ico') }}">
</head>
<body>
    <h2>
        
        <img alt="Avatar" class="avatar" src="{{ url_for('static', filename='images/avatar.png') }}">
        {{ name }}'s Watchlist</h2>
    
    {# 使用 length 过滤器获取 movies 变量的长度 #}
    <p>{{ movies|length }} Titles</p>
    <ul class="movie-list">
        {% for movie in movies %}  {# 迭代 movies 变量 #}
        <li>{{ movie['title'] }} - {{ movie['year'] }}</li>  {# 等同于 movie['title'] #}
        {% endfor %}  {# 使用 endfor 标签结束 for 语句 #}
    </ul>
    <footer>
        <small>&copy; 2025 <a href="https://blog.csdn.net/qq_17405059?spm=1000.2115.3001.5343">迪小莫学AI</a></small>
    </footer>
    <img alt="Walking Totoro" class="totoro" src="{{ url_for('static', filename='images/totoro.gif') }}">
    
</body>
</html>